import React from 'react'
import { NavLink } from 'umi'
import './index.less'
//
//layouts文件夹是根组件
export default function Index(props: any) {
  const { location } = props
  if (location.pathname == '/mine' || location.pathname.includes('/films')) {
    return (
      <div>
        <div className='footer'>
          <NavLink to="/films" activeClassName='active'>电影</NavLink>
          <NavLink to="/cinema" activeClassName='active'>影院</NavLink>
          <NavLink to="/mine" activeClassName='active'>我的</NavLink>
        </div>
        {props.children}
      </div>
    )
  }
  return (
    <div>
      {props.children}
    </div>
  )
}
